package cn.gdsdxy.s06spring.config;

import cn.gdsdxy.s06spring.entity.User;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {
    @Bean//@Bean是将方法的返回值注册为Spring容器管理的Bean，该Bean的名称就是方法名
    public User user(){
        User user=new User();
        user.setUcode("11");
        user.setUname("tom");
        user.setUpassword("123456");
        return user;
    }
}
